/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *																 *
 *	r2GLApp - r2 Graphs Library Application						 *
 *																 *
 *	File:		main.cpp										 *
 *	Authors:	Rafael Kikuchi ( shinjikik@gmail.com )			 *
 *				Rafael Romeiro ( rafaelromeiro@gmail.com )		 *
 *	Date:		08/09/2008										 *
 *	License:	CC-GNU LGPL										 *
 *				http://creativecommons.org/licenses/LGPL/2.1/	 *
 *	Version:	0.1.0											 *
 *																 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include "r2GLApp.h"

int main(int argc, char* argv[])
{
	r2GLApp App;

	bool Directed = r2DIRECTED;
	int StructType = r2LIST;
	string FileName = "Graph.txt";
	int StartNode = 1;

	for ( int i = 1 ; i < argc ; i++ )
	{
		if ( strcmp( argv[i], "-S" ) == 0 )
			StartNode = atoi(argv[++i]);
		else if ( strcmp( argv[i], "-D" ) == 0 )
			Directed = r2DIRECTED;
		else if ( strcmp( argv[i], "-U" ) == 0 )
			Directed = r2UNDIRECTED;
		else if ( strcmp( argv[i], "-M" ) == 0 )
			StructType = r2MATRIX;
		else if ( strcmp( argv[i], "-L" ) == 0 )
			StructType = r2LIST;
		else
			FileName = argv[i];
	}

	App.init(Directed, StructType, FileName);
	App.go(StartNode, FileName);
	App.release();

	return 0;
}